package com.crm.service.statisticAnalysis.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.crm.model.statisticAnalysis.dtos.ActivityNameWithCountDTO;
import com.crm.model.statisticAnalysis.dtos.ChannelNameWithCountDTO;
import com.crm.model.statisticAnalysis.pojos.ChannelStatistics;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface ChannelMapper extends BaseMapper<ChannelStatistics> {

    /**
     * 查询活动名称及数量
     * @param endTime
     * @return
     */
    List<ActivityNameWithCountDTO> getActivityNameWithCount(@Param("endTime") LocalDateTime endTime,@Param("beginTime") LocalDateTime beginTime);

    /**
     * 查询渠道名称及新增数
     * @param endTime
     * @param beginTime
     * @return
     */
    List<ChannelNameWithCountDTO> getChannelNameAndCount(@Param("endTime")LocalDateTime endTime, @Param("beginTime")LocalDateTime beginTime);

}
